package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Questionnaire;
import cn.wolfcode.trip.base.query.QuestionnaireQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface QuestionnaireMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Questionnaire record);

    Questionnaire selectByPrimaryKey(Long id);

    List<Questionnaire> selectAll();

    int updateByPrimaryKey(Questionnaire record);

    List<Questionnaire> selectForList(QuestionnaireQueryObject qo);

    List getQuestionnaireId();

    Questionnaire selectResultByIds(@Param("userId") Long userId, @Param("problemId") Long problemId);

    void insertQuestionnaireMessage(@Param("userId") Long userId, @Param("problemId") Long problemId, @Param("answerId") Long answerId);

    void updateQuestionnaireMessage(@Param("userId") Long userId, @Param("problemId") Long problemId, @Param("answerId") Long answerId);

    int selectEvaluatesByUserId(Long userId);

    void insertEvaluates(@Param("userId") Long userId, @Param("evaluate") String evaluate);

    void updateEvaluates(@Param("userId") Long userId, @Param("evaluate") String evaluate);

    List selectQuestionnaire(QuestionnaireQueryObject qo);

    List selectEvaluate(QuestionnaireQueryObject qo);

    List<Questionnaire> selectQuestionnaireByUserId(Long userId);
}